export async function callConfirmMethod(callMethod,layerId){
    if(callMethod){
        const result =await callMethod()
        if(result){
            this.search()
        }
    }
    layer.close(layerId);
}

export async function layAddRequiredIcon(){
    const labelList=document.querySelectorAll(`.layerPublicStyle .layRequired .layui-form-label`);
    const requiredIcon = `<span class="layui-required layui-icon">*</span>`
    
    for(let i=0;i<labelList.length;i++){
        const item = labelList[i]
        const text = item.innerText;
        item.innerHTML = `${requiredIcon}${text}`
    }
}